import axios from "./axios"

export default {

    getFiles: (id) => {
        return axios({
            method: "get",
            url: "/file/getFiles/"+id, 
        })
    },

    // 删除文件
    deleteFile: (id) =>{
        return axios({
            method: "delete",
            url: "/file/deleteFile/" + id,
        })
    },

    deleteFileById: (id) =>{
        return axios({
            method: "delete",
            url: "/file/delete/" + id,
        })
    },

     // 我的附件
     myFiles: (data) => {
        return axios({
            method: "get",
            url: "/teacher/myFiles",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "name": data.name
            }
        })
    },


    // 论坛列表
    getCommentList: () =>{
        return axios({
            method: "get",
            url: "/comment/list",
        })
    },

    editComment: (data) =>{
        return axios({
            method: "post",
            url: "/comment/add",
            data
        })
    },


}